home *** CD-ROM | disk | FTP | other *** search
- #include "String.h"
-
- // operator =
-
- RJS_String &RJS_String::operator = (char ch)
- {
- assign(&ch,1);
- return *this;
- }
-
- RJS_String &RJS_String::operator = (const char *s)
- {
- assign(s,RJS_String::length(s));
- return *this;
- }
-
- RJS_String &RJS_String::operator = (const RJS_String &str)
- {
- if (this==&str) return *this;
- assign(str.cptr(),str.length());
- return *this;
-
- }
-
- // operator = for substrings
-
- RJS_SubString &RJS_SubString::operator = (char ch)
- {
- assign(&ch,1);
- return *this;
- }
-
- RJS_SubString &RJS_SubString::operator = (const char *s)
- {
- assign(s,RJS_String::length(s));
- return *this;
- }
-
- RJS_SubString &RJS_SubString::operator = (const RJS_String &s)
- {
- assign(s.cptr(),s.length());
- return *this;
- }
-
-
- RJS_SubString &RJS_SubString::operator = (const RJS_SubString &ss)
- {
- if (this==&ss) return *this;
- assign(ss.cptr(),ss.length());
- return *this;
- }
-
-
-